.button {
	position: relative;
	height: 32px;
	border: 1px solid transparent;
	padding: 0px 12px;
	background: none;
	outline: none;
	color: var(--tla-color-text-1);
	border-radius: var(--tla-radius-2);
	cursor: pointer;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	gap: 8px;

	/* text medium */
	font-size: 12px;
	line-height: 1.3;
	font-weight: 500;
	font-family: var(--tla-font-ui);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

.button > .spinner {
	position: absolute;
	top: calc(50% - 20px);
	left: calc(50% - 20px);
	height: 40px;
	width: 40px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: tla-spin 1.5s linear infinite;
}

.spinner {
	color: var(--tla-color-text-3);
	animation: tla-spin 1.5s linear infinite;
}

@keyframes tla-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.cta {
	background-color: var(--tla-color-cta);
	color: #ffffff;
	font-weight: 600;
}

.primary {
	background-color: var(--tla-color-primary);
	box-shadow: var(--tla-shadow-primary-highlight);
	color: var(--tla-color-contrast);
}

.primary[data-state='loading'] {
	color: var(--tla-color-primary);
}

.primary[data-state='loading'] > .spinner {
	color: var(--tla-color-contrast);
}

.secondary {
	background-color: var(--tla-color-secondary);
	border: 1px solid var(--tla-color-secondary-border);
	color: var(--tla-color-text-1);
}

.warning {
	background-color: var(--tla-color-secondary);
	color: var(--tla-color-warning);
}

.iconRight {
	position: absolute;
	right: 8px;
}

.spinner {
	animation: tla-spin 1.2s linear infinite;
}

@keyframes tla-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Ghost */

.ghost {
	position: relative;
}

.primary.ghost {
	color: var(--tla-color-primary);
	background-color: transparent;
}

.secondary.ghost {
	color: var(--tla-color-secondary);
	background-color: transparent;
	border: none;
}

.warning.ghost {
	color: var(--tla-color-warning);
	background-color: transparent;
}

@media (hover: hover) {
	.ghost:hover::after {
		display: block;
		content: '';
		position: absolute;
		inset: 0px 4px;
		border-radius: 6px;
		background-color: var(--color-muted-2);
	}
}
